<%--
  Created by IntelliJ IDEA.
  User: david
  Date: 2025/6/27
  Time: 9:30
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<html>
<head>
    <title>列表</title>
</head>
<body>
<a href="/student/add">新增</a>
<table border="1" width="600">
    <thead>
        <tr>
            <th>id</th>
            <th>name</th>
            <th>email</th>
            <th>操作</th>
        </tr>
    </thead>
    <tbody>
    <c:forEach items="${studentList}" var="student">
        <tr>
            <td>${student.id}</td>
            <td>${student.name}</td>
            <td>${student.email}</td>
            <td><a href="/student/edit?id=${student.id}">编辑</a><a href="/student/delete?id=${student.id}" onclick="return confirm('是否真的删除?');">删除</a></td>
        </tr>
    </c:forEach>
    </tbody>
</table>
</body>
</html>
